3.4 \(\int (a+a \sec (c+d x)) \sin ^3(c+d x) \, dx\)

Optimal. Leaf size=58 \[ \frac {a \cos ^3(c+d x)}{3 d}+\frac {a \cos ^2(c+d x)}{2 d}-\frac {a \cos (c+d x)}{d}-\frac {a \log (\cos (c+d x))}{d} \]

[Out]

-a*cos(d*x+c)/d+1/2*a*cos(d*x+c)^2/d+1/3*a*cos(d*x+c)^3/d-a*ln(cos(d*x+c))/d

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3872, 2836, 12, 75} \[ \frac {a \cos ^3(c+d x)}{3 d}+\frac {a \cos ^2(c+d x)}{2 d}-\frac {a \cos (c+d x)}{d}-\frac {a \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sec[c + d*x])*Sin[c + d*x]^3,x]

[Out]

-((a*Cos[c + d*x])/d) + (a*Cos[c + d*x]^2)/(2*d) + (a*Cos[c + d*x]^3)/(3*d) - (a*Log[Cos[c + d*x]])/d

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 75

Int[((d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_))*((e_) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*
x)*(d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && IGtQ[p, 0] && EqQ[b*e + a*f, 0] &&  !(ILtQ[n
 + p + 2, 0] && GtQ[n + 2*p, 0])

Rule 2836

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d*x)/b
)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2,
 0]

Rule 3872

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[((g*C
os[e + f*x])^p*(b + a*Sin[e + f*x])^m)/Sin[e + f*x]^m, x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps

\begin {align*} \int (a+a \sec (c+d x)) \sin ^3(c+d x) \, dx &=-\int (-a-a \cos (c+d x)) \sin ^2(c+d x) \tan (c+d x) \, dx\\ &=\frac {\operatorname {Subst}\left (\int \frac {a (-a-x) (-a+x)^2}{x} \, dx,x,-a \cos (c+d x)\right )}{a^3 d}\\ &=\frac {\operatorname {Subst}\left (\int \frac {(-a-x) (-a+x)^2}{x} \, dx,x,-a \cos (c+d x)\right )}{a^2 d}\\ &=\frac {\operatorname {Subst}\left (\int \left (a^2-\frac {a^3}{x}+a x-x^2\right ) \, dx,x,-a \cos (c+d x)\right )}{a^2 d}\\ &=-\frac {a \cos (c+d x)}{d}+\frac {a \cos ^2(c+d x)}{2 d}+\frac {a \cos ^3(c+d x)}{3 d}-\frac {a \log (\cos (c+d x))}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 57, normalized size = 0.98 \[ -\frac {3 a \cos (c+d x)}{4 d}+\frac {a \cos (3 (c+d x))}{12 d}-\frac {a \left (\log (\cos (c+d x))-\frac {1}{2} \cos ^2(c+d x)\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sec[c + d*x])*Sin[c + d*x]^3,x]

[Out]

(-3*a*Cos[c + d*x])/(4*d) + (a*Cos[3*(c + d*x)])/(12*d) - (a*(-1/2*Cos[c + d*x]^2 + Log[Cos[c + d*x]]))/d

________________________________________________________________________________________

fricas [A]  time = 0.52, size = 49, normalized size = 0.84 \[ \frac {2 \, a \cos \left (d x + c\right )^{3} + 3 \, a \cos \left (d x + c\right )^{2} - 6 \, a \cos \left (d x + c\right ) - 6 \, a \log \left (-\cos \left (d x + c\right )\right )}{6 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(d*x+c))*sin(d*x+c)^3,x, algorithm="fricas")

[Out]

1/6*(2*a*cos(d*x + c)^3 + 3*a*cos(d*x + c)^2 - 6*a*cos(d*x + c) - 6*a*log(-cos(d*x + c)))/d

________________________________________________________________________________________

giac [A]  time = 0.36, size = 66, normalized size = 1.14 \[ -\frac {a \log \left (\frac {{\left | \cos \left (d x + c\right ) \right |}}{{\left | d \right |}}\right )}{d} + \frac {2 \, a d^{2} \cos \left (d x + c\right )^{3} + 3 \, a d^{2} \cos \left (d x + c\right )^{2} - 6 \, a d^{2} \cos \left (d x + c\right )}{6 \, d^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(d*x+c))*sin(d*x+c)^3,x, algorithm="giac")

[Out]

-a*log(abs(cos(d*x + c))/abs(d))/d + 1/6*(2*a*d^2*cos(d*x + c)^3 + 3*a*d^2*cos(d*x + c)^2 - 6*a*d^2*cos(d*x +
c))/d^3

________________________________________________________________________________________

maple [A]  time = 0.61, size = 61, normalized size = 1.05 \[ -\frac {a \cos \left (d x +c \right ) \left (\sin ^{2}\left (d x +c \right )\right )}{3 d}-\frac {2 a \cos \left (d x +c \right )}{3 d}-\frac {a \left (\sin ^{2}\left (d x +c \right )\right )}{2 d}-\frac {a \ln \left (\cos \left (d x +c \right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sec(d*x+c))*sin(d*x+c)^3,x)

[Out]

-1/3/d*a*cos(d*x+c)*sin(d*x+c)^2-2/3*a*cos(d*x+c)/d-1/2/d*a*sin(d*x+c)^2-a*ln(cos(d*x+c))/d

________________________________________________________________________________________

maxima [A]  time = 0.62, size = 47, normalized size = 0.81 \[ \frac {2 \, a \cos \left (d x + c\right )^{3} + 3 \, a \cos \left (d x + c\right )^{2} - 6 \, a \cos \left (d x + c\right ) - 6 \, a \log \left (\cos \left (d x + c\right )\right )}{6 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(d*x+c))*sin(d*x+c)^3,x, algorithm="maxima")

[Out]

1/6*(2*a*cos(d*x + c)^3 + 3*a*cos(d*x + c)^2 - 6*a*cos(d*x + c) - 6*a*log(cos(d*x + c)))/d

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 45, normalized size = 0.78 \[ -\frac {a\,\cos \left (c+d\,x\right )-\frac {a\,{\cos \left (c+d\,x\right )}^2}{2}-\frac {a\,{\cos \left (c+d\,x\right )}^3}{3}+a\,\ln \left (\cos \left (c+d\,x\right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(c + d*x)^3*(a + a/cos(c + d*x)),x)

[Out]

-(a*cos(c + d*x) - (a*cos(c + d*x)^2)/2 - (a*cos(c + d*x)^3)/3 + a*log(cos(c + d*x)))/d

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ a \left (\int \sin ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \sin ^{3}{\left (c + d x \right )}\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(d*x+c))*sin(d*x+c)**3,x)

[Out]

a*(Integral(sin(c + d*x)**3*sec(c + d*x), x) + Integral(sin(c + d*x)**3, x))

________________________________________________________________________________________